﻿using System;
using System.IO;
using System.Linq;

using Microsoft.VisualStudio.Package;
using Microsoft.WowAddonStudio.Lua.LanguageService.Intellisense.Providers;

using NUnit.Framework;

namespace Microsoft.WowAddonStudio.Lua.LanguageService.Tests.Intellisense
{
    [TestFixture]
    public class DocumentationDeclarationProviderTest : DeclarationProviderTestBase<XmlDocumentationDeclarationProvider>
    {
        private const string documentationPath = "Documentation";

        public override XmlDocumentationDeclarationProvider CreateDeclarationProvider()
        {
            return new XmlDocumentationDeclarationProvider(Path.Combine(Environment.CurrentDirectory, documentationPath));
        }

        [Test]
        public void LoadDocumentationTest()
        {
            declarationProvider.Initialize(this.CreateParseRequest(ParseReason.CompleteWord, 0, 0));
            Assert.AreNotEqual(0, declarationProvider.GetDeclarations().Count());
        }
    }
}
